/**
 * SAS url
 */
interface StorageResponse extends BaseResponse{
     ContainerName:  string;
     Expire: string;
     StorageSharedSigniture: string;
}

/**
 * SAS
 */
interface IStorageService{
    AquireStorageSharedSigniture(containerName: string):ng.IHttpPromise<StorageResponse>;
}

class StorageService implements IStorageService{
    constructor(private http: ng.IHttpService,private route: routeService){
    }

    AquireStorageSharedSigniture(containerName: string):ng.IHttpPromise<StorageResponse>{
        return this.http<StorageResponse>({
            method:"GET",
            url: this.route.getUrl("Storage/AquireStorageSharedSigniture/{{containerName}}",{
                containerName: containerName
            })
        });
    }
    
}

app.service("storageService",['$http','routeService',StorageService]);
